//
//  PCCategoriesKit.h
//  PCCategoriesDemo
//
//  Created by 宋鹏程 on 14-4-8.
//  Copyright (c) 2014年 宋鹏程. All rights reserved.
//

#ifndef PCCategories_Kit_h
#define PCCategories_Kit_h


/****************************************/
#import "NSObject+Convenience.h"
#import "NSString+Convenience.h"
#import "NSNumber+Convenience.h"
#import "NSDate+Convenience.h"
#import "UIView+Convenience.h"
#import "UILabel+Convenience.h"
#import "UIImage+Convenience.h"
#import "UITextView+Convenience.h"
#import "UIImageView+Convenience.h"


/********************NSNumber********************/
#define PCBoolObject(objc)          [NSNumber boolWithObject:objc]

#define PCIntegerObject(objc,int)   [NSNumber integerWithObject:objc holdInteger:int]
#define PCUIntegerObject(objc,int)  [NSNumber uIntegerWithObject:objc holdUInteger:int]
#define PCFloatObject(objc,float)   [NSNumber floatWithObject:objc holdFloat:float]


/********************NSString********************/
#define PCStrFormat(...)            [NSString stringWithFormat:__VA_ARGS__]
#define PCStrObject(objc,str)       [NSString stringWithObject:objc holdString:str]


/********************NSDate********************/
#define PCDateObject(timeStamp)     [NSDate dateWithServerGMT:(timeStamp)]


/********************UIImage********************/
#define PCImage(imageName)          [UIImage imageNamed:(imageName)]
#define PCImageOriginal(imageName)  [PCImage(imageName) imageWithRenderingMode:1]


/********************NSFont********************/
#define PCFont(fontSize)            [UIFont systemFontOfSize:(fontSize)]
#define PCFontBold(fontSize)        [UIFont boldSystemFontOfSize:(fontSize)]
#define PCFontItalic(fontSize)      [UIFont italicSystemFontOfSize:(fontSize)]
#define PCFontSystem                PCFont([UIFont systemFontSize])

#define PCGolfFont(fontSize)        [UIFont fontWithName:@"Helvetica" size:fontSize]
#define PCCourseFont(fontSize)      [UIFont fontWithName:@"HiraKakuProN-W3" size:fontSize]

/********************NSURL********************/
#define PCURL(strURL)               [NSURL URLWithString:(strURL)]


/********************NSIndexPath********************/
#define PCIndexPath(row,section)    [NSIndexPath indexPathForRow:(row) inSection:(section)]


/********************NSIndexSet********************/
#define PCIndexSet(index)           [NSIndexSet indexSetWithIndex:(index)]
#define PCIndexSetInRange(loc,len)  [NSIndexSet indexSetWithIndexesInRange:NSMakeRange((loc),(len))]


/********************NSColor********************/
#define PCColorDefault              PCColorOfGrayScale(0.973f,1)
#define PCColorBlack                [UIColor blackColor]
#define PCColorDarkGray             [UIColor darkGrayColor]
#define PCColorLightGray            [UIColor lightGrayColor]
#define PCColorWhite                [UIColor whiteColor]
#define PCColorGray                 [UIColor grayColor]
#define PCColorRed                  [UIColor redColor]
#define PCColorGreen                [UIColor greenColor]
#define PCColorBlue                 [UIColor blueColor]
#define PCColorCyan                 [UIColor cyanColor]
#define PCColorYellow               [UIColor yellowColor]
#define PCColorMagenta              [UIColor magentaColor]
#define PCColorOrange               [UIColor orangeColor]
#define PCColorPurple               [UIColor purpleColor]
#define PCColorBrown                [UIColor brownColor]
#define PCColorClear                [UIColor clearColor]

#define PCColorOfGrayScale(w,a)     [UIColor colorWithWhite:(w) alpha:(a)]
#define PCColorOfRGB(r,g,b,a)       [UIColor colorWithRed:(r/255.0) green:(g/255.0) blue:(b/255.0) alpha:(a)]
#define PCColorFromRGB(rgb)         PCColorOfRGB(((float)((rgb&0xFF0000)>>16)),((float)((rgb&0xFF00)>>8)),((float)(rgb&0xFF)),1.0)


#endif
